package Java复习;
class Triangle {
    double w, h;
    public Triangle(double w, double h) {

        this.w = w;
        this.h = h;
    }
    public Triangle() {
    }
    public double getArea() {
        return w * h;
    }
}
public class gdq2 {
        public static void main(String[] args) {
            Triangle triangle = new Triangle(2, 3);
            System.out.println(triangle.getArea());
        }
    }
